from django.db import models

# Create your models here.

class User(models.Model):
    username = models.CharField(max_length=200)
    user_level = models.IntegerField()
    objects = models.Manager()

    class Meta:
        db_table = 'user'

class Goods(models.Model):
    title = models.CharField(max_length=200)
    price = models.CharField(max_length=200)
    objects = models.Manager()

    class Meta:
        db_table = 'goods'

class Youhui(models.Model):
    price = models.CharField(max_length=200)
    objects = models.Manager()

    class Meta:
        db_table = 'youhui'

class Cart(models.Model):
    name = models.CharField(max_length=200)
    price = models.CharField(max_length=200)
    uid = models.ForeignKey(User,on_delete=models.CASCADE)
    objects = models.Manager()

    class Meta:
        db_table = 'cart'
